(navigation image)
Home Animation & Cartoons | Arts & Music | Community Video | Computers & Technology | Cultural & Academic Films | Ephemeral Films | Movies | News & Public Affairs | Prelinger Archives | Spirituality & Religion | Sports Videos | Television | Videogame Videos | Vlogs | Youth Media
Search: Advanced Search
Anonymous User (login or join us) Upload

View movie

[item image]
View thumbnails
Run time: 19 minutes 3 seconds

Play / Download (help[help])

(25.9 M)Ogg Video
(47.1 M)h.264
(73.2 M)QuickTime


All Files: HTTP
[Attribution-Noncommercial-Share Alike 3.0]

Resources

Bookmark

Johan Falk/NodeOneLearn Drupal 13d: hook_menu

You are using our new video/audio player!
I prefer flash (when possible)
Give us feedback!

This screencast is a part of the epic learning series "Four weeks of Drupal", chapter "Writing a module". You can view the full series at http://dev.nodeone.se/en/four-weeks-of-drupal.

Please post any comments over there, or we won't see them. Sorry.
---
This screencasts introduces the concept of *hooks* â functions that, thanks to their names, are recognized and called by Drupal at certain events.
In particular, this screencast shows how a module registers new paths on your Drupal site, by implementing "hook_menu". It shows some aspects of using this hook:
* Declaring new paths
* Declaring a callback function
* Setting access to the path
* Setting which menu the page should appear

This screencast also points out that you'll need to clear the cache to see changes in the menu items.

Code added to wordlist.module

/**
* Implements hook_menu().
*/
function wordlist_menu() {
$items['admin/config/content/wordlist'] = array(
'title' => 'Word list',
'description' => 'Manage the list of globally available words on your site.',
'page callback' => 'wordlist_page',
'access callback' => 'user_access',
'access arguments' => array('administer_site_configuration'),
'menu_name' => 'management',
);

return $items;
}

/**
* Builds the page for configuring Word list.
*/
function wordlist_page() {
return 'Hello world!';
}

---
This screencast is a part of the epic learning series "Four weeks of Drupal", chapter "Writing a module". You can view the full series at http://dev.nodeone.se/en/four-weeks-of-drupal.

Please post any comments over there, or we won't see them. Sorry.


This movie is part of the collection: Community Video

Producer: Johan Falk/NodeOne
Audio/Visual: sound
Keywords: Drupal; 4 weeks of Drupal; NodeOne; coding

Creative Commons license: Attribution-Noncommercial-Share Alike 3.0


Individual Files

Movie Files QuickTime h.264 Ogg Video
Drupal 13d - hook_menu 73.2 MB
47.1 MB
25.9 MB
Image Files Animated GIF Thumbnail
Drupal 13d - hook_menu 202.3 KB
6.2 KB
Information FormatSize
LearnDrupal13dHook_menu_files.xml Metadata [file]
LearnDrupal13dHook_menu_meta.xml Metadata 2.3 KB

Be the first to write a review
Downloaded 48 times
Reviews


Terms of Use (10 Mar 2001)